package com.ruoyi.common.utils;

import com.ruoyi.common.core.domain.entity.SysUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.messaging.simp.SimpMessagingTemplate;

@Configuration
public class SendSocketMsg {


        @Autowired
        private SimpMessagingTemplate simpMessagingTemplate;

        public void sendSocketMsg(String userId,Msg str){

            simpMessagingTemplate.convertAndSend(Constants.WEBSOCKET_PREFIX + "/user/" + userId, str);
        }
}
